package com.zztl.infiniteBand.presenter

import android.content.Context

import com.zztl.infiniteBand.base.BasePresenter
import com.zztl.infiniteBand.model.AddressListBean
import com.zztl.infiniteBand.net.FilterSubscriber
import com.zztl.infiniteBand.net.RetorfitServiceManger
import com.zztl.infiniteBand.ui.view.mvpview.AddressListView

/**
 * @desc
 * @auth ${user}
 * @time 2018/9/25  17:33
 */
class AddressPresenter : BasePresenter<AddressListView>() {
    fun getAddressList(context: Context) {
        addSubscribe(RetorfitServiceManger.observe(RetorfitServiceManger.instance!!.apiService
                .getAddressList(""))
                .subscribe(object : FilterSubscriber<AddressListBean>(context) {

                    override fun success(bean: AddressListBean) {
//                        val addressListView = view!! as AddressListView
                        view!!.getSuccess(bean)
                    }


                }))
    }
}
